import {animate, animateChild, group, query, state, style, transition, trigger} from "@angular/animations";

export const slideInAnimation =
  trigger('routeAnimations', [
    transition('* <=> *', [
      query(':enter', [style({/*transform: 'scale(.1)', transformOrigin: '50vw 50vh',*/ opacity: .1, filter: 'blur(5px)'})], {optional: true}),
      group([
        query(':enter', [
          animate('500ms ease-out', style({transform: 'scale(1)', opacity: 1, filter: 'blur(0)'}))
        ], {optional: true}),
        query('@*', animateChild(), {optional: true})
      ]),
    ])
  ]);
